import cv2
import matplotlib.pyplot as plt

# 读取图像
img1 = cv2.imread("podoid.jpeg")
print(img1.shape) # (1290, 1080, 3)
# 图像剪切
img2 = img1[420:800, 300:800]
print(img2.shape) # (380, 500, 3)

# 图像显示
fig, axes = plt.subplots(1, 2, figsize=(10, 8), dpi=100)
axes[0].imshow(img1[:, :, ::-1])
axes[0].set_title("original")
axes[1].imshow(img2[:, :, ::-1])
axes[1].set_title("shear")

plt.show()